home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 16
/
Aminet 16 (1996)(GTI - Schatztruhe)[!][Dec 1996].iso
/
Aminet
/
util
/
cli
/
promptpath.readme
< prev
next >
Wrap
Text File
|
1996-11-04
|
2KB
|
39 lines
Short: Shortens shellprompts in a sensible way
Author: sysop@sweetdreams.lahn.de (Matthias Bethke)
Uploader: sysop@sweetdreams.lahn.de (Matthias Bethke)
Version: 37.2
Type: util/cli
Requires: AmigaOS 2.04
If you have a lot of nested directories on your HD, shellprompts of the
usual form "%n:%s>" become quite long, leaving little room on the
commandline. This program can be inserted in the promt line and shortens
the path in a more sensible way then the frequently suggested "echo `cd`
len x". Besides it's shorter 'n faster :-) (can also be made resident)
A path like
Work:this/is/a/very/long/subdir/path
will be shortened to
Work://////path
if it exceeds the desired promplength (one slash for every subdir plus the
full name of the last component)
To try it out, you can start it like any CLI program, as the only paramater
it takes the desired length of the prompt. The last path component will
always be displayed, even if the resulting string is longer than the number
of characters you specified.
To insert it in your prompt, use the following command in your
shell-startup:
prompt "%n:*`promptpath <length>*`>" (replacing <length> with a number of
course)
As the program is executed each time the shell displays a new prompt,
making it resident is definitely a Good Thing(tm) :-)
============================= Archive contents =============================
Original Packed Ratio Date Time Name
-------- ------- ----- --------- -------- -------------
344 316 8.1% 30-Oct-96 21:22:26 promptpath
1326 707 46.6% 30-Oct-96 21:40:44 promptpath.readme
-------- ------- ----- --------- --------
1670 1023 38.7% 31-Oct-96 13:54:02 2 files